/*
 * Copyright (C) 2008 Andreas Pabst <info@timbap.de>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * version 2, as published by the Free Software Foundation.
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License version 2 for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * version 2 along with this program; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 *
 */

#ifndef TIMBAP_CONN_H
#define TIMBAP_CONN_H

#include <lo/lo.h>

#define DEFAULT_TIMBAP_PORT_SEED 3001

struct timbap_conn_t {
    
    lo_server osc_server;   /* osc server for receiving commands  */
    lo_address osc_dest;    /* address to send commands to */
    unsigned int load_rq,   /* indicator for received load request */
                 unload_rq; /* indicator for received unload request */
    char* fileuri;         /* the URI of the file to load/unload */
    
};

void timbap_init_receiver(struct player_t *pl, int recv_port);
void timbap_init_sender(struct player_t *pl, int send_port);
void timbap_publish_status(struct player_t *pl, struct timecoder_t *tc);

#endif
